;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages cloak)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages)
  #:use-module (gnu packages crates-io)
  #:use-module (gnu packages crates-graphics)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages tls)
  #:use-module ((guixrus packages common rust) #:prefix rus:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module (guix build-system cargo))

(define-public cloak
  (package
    (name "cloak")
    (version "0.2.0")
    (source (origin
              (method url-fetch)
              (uri (crate-uri "cloak" version))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "0k50nwb0q3ciqnpv3fjvrjms5lx7y5vvibbgdrfclnsrq9xba7gs"))))
    (build-system cargo-build-system)
    (arguments
     (list #:cargo-inputs
           `(("rust-clap" ,rust-clap-2)
             ("rust-data-encoding" ,rust-data-encoding-2)
             ("rust-dirs" ,rust-dirs-1)
             ("rust-failure" ,rust-failure-0.1)
             ("rust-open" ,rust-open-1)
             ("rust-ring" ,rust-ring-0.14)
             ("rust-serde" ,rust-serde-1)
             ("rust-serde-derive" ,rust-serde-derive-1)
             ("rust-toml" ,rust-toml-0.5))))
    (home-page "https://github.com/evansmurithi/cloak")
    (synopsis "Command line OTP authenticator application")
    (description
     "This package provides a Command Line OTP (One Time Password)
Authenticator application.")
    (license license:expat)))
